package com.gxa.www.cl.controller;

import com.gxa.www.cl.common.base.RespResult;
import com.gxa.www.cl.domain.dto.LoginFormParamDTO;
import com.gxa.www.cl.service.SysAdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class LoginController {
    @Autowired
    private SysAdminService sysAdminService;

    @PostMapping("/login")
    public RespResult login(@RequestBody LoginFormParamDTO loginFormParamDTO) {
        return sysAdminService.login(loginFormParamDTO); // 直接返回服务层的结果
    }

//    @PostMapping("/api/updatePassword")
//    public RespResult updatePassword(@RequestBody Map<String, String> passwordData) {
//        return sysAdminService.updatePassword(passwordData);
//    }
}